package us.codecraft.webmagic.model.samples;

import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.model.ConsolePageModelPipeline;
import us.codecraft.webmagic.model.OOSpider;
import us.codecraft.webmagic.model.annotation.ExtractBy;
import us.codecraft.webmagic.model.annotation.HelpUrl;
import us.codecraft.webmagic.model.annotation.TargetUrl;

import java.util.List;

/**
 * 部编版小学语文
 */
@TargetUrl("http://mp.weixin.qq.com/s?__biz=Mzg4MjEyNjM5NA==&mid=100000871&idx=\\d+&sn=\\w+&scene=19#wechat_redirect")
public class Bbbxy {

    @ExtractBy(value = ".rich_media_title", type = ExtractBy.Type.Css)
    private String title;
//    @ExtractBy(value = "div.rich_media_content p img ")
//    private List<String> contentImgUrls;

    public static void main(String[] args) {
        String startURL = "https://m.sohu.com/a/367938128_653254#read";
        OOSpider.create(Site.me().setSleepTime(0), ConsolePageModelPipeline.class, Bbbxy.class)
                .addUrl(startURL)
                .run();
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

//    public List<String> getContentImgUrls() {
//        return contentImgUrls;
//    }
//
//    public void setContentImgUrls(List<String> contentImgUrls) {
//        this.contentImgUrls = contentImgUrls;
//    }


}
